package com.smbms.mapper;

import java.util.List;
import java.util.Set;

import org.apache.ibatis.annotations.Param;

import com.smbms.entity.SmbmsUser;

public interface SmbmsUserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(SmbmsUser record);

    SmbmsUser selectByPrimaryKey(Long id);

    List<SmbmsUser> selectAll(@Param("userName") String userName,@Param("userRole") Integer userRole);

    int updateByPrimaryKey(SmbmsUser record);

	SmbmsUser login(@Param("userCode") String userCode, 
			@Param("userPassword") String userPassword);

	
	List<SmbmsUser> selectUserByPage(@Param("userName") String userName,@Param("userRole") Integer userRole, 
			@Param("startRow") Integer startRow,@Param("pageSize") Integer pageSize);
	
	int selectUserByPageCount(@Param("userName") String userName,@Param("userRole") Integer userRole);

	int checkUserCode(String userCode);

	SmbmsUser findByUsername(String userCode);

	String findRoles(String userCode);

	Set<String> findPermissions(String userCode);
}